<template>
  <div id="Lawyer">
    <el-form :inline="true">
      <el-form-item>
        <el-button @click="insertOne">新增</el-button>
      </el-form-item>
    </el-form>
    <vxe-table stripe :data="lawyerList" highlight-hover-row>
      <vxe-table-column title="律师姓名" field="lawyerName" align="center"></vxe-table-column>
      <vxe-table-column title="工作地点" field="location" align="center"></vxe-table-column>
      <vxe-table-column title="联系电话" field="phone" align="center"></vxe-table-column>
      <vxe-table-column title="工作年限" field="workYear" align="center"></vxe-table-column>
      <vxe-table-column title="职务" field="position" align="center"></vxe-table-column>
      <vxe-table-column title="操作" align="center">
        <template v-slot="{row}">
          <el-button type="danger" @click="deleteOne(row)">删除</el-button>
        </template>
      </vxe-table-column>
    </vxe-table>
  </div>
</template>

<script>
import {listLawyer} from "@/api/Lawyer";

export default {
  name: "Lawyer",
  data() {
    return {
      lawyerList: []
    }
  },
  mounted() {
    this.getData()
  },
  methods: {
    getData() {
      listLawyer().then(res => {
        this.lawyerList = res.data.list
      })
    },
    deleteOne(row) {
    },
    insertOne() {
      this.$router.push('/admin/lawyer/add')
    }
  }
}
</script>

<style scoped lang="scss">
#Lawyer {

}
</style>
